﻿using System;
using System.Collections.Generic;
using System.Text;
using LuaInterface;

namespace JEng_Mark_1.Managers
{
    public class JLuaManager
    {
        private static Lua _lua;


        /// <summary>
        /// The scripting engine object
        /// </summary>
        public static Lua ScriptingEngine { get { return _lua; } }

        public JLuaManager()
        {
            
        }

        public static void Initialize()
        {
            //Must be run after all other subsystems have been initialized
            _lua = new Lua();

            //register static methods
        }

        public static void RevealManagers()
        {
            //reveal the subsystems
            _lua["Game"] = JEngineManager.Game;
            _lua["GraphicsDevice"] = JEngineManager.Device;
            _lua["ContentManager"] = JEngineManager.ContentManager;
            _lua["CameraManager"] = JEngineManager.CameraManager;
            _lua["FpsCounter"] = JEngineManager.FpsCounter;
            _lua["ShaderManager"] = JEngineManager.ShaderManager;
            _lua["TextureManager"] = JEngineManager.TextureManager;
            _lua["Input"] = JEngineManager.Input;
            _lua["ScreenManager"] = JEngineManager.ScreenManager;
            _lua["SceneGraphManager"] = JEngineManager.SceneGraphManager;
            _lua["CameraManager"] = JEngineManager.CameraManager;
        }
    }
}
